//
//  MXSignView.m
//  Stratups
//
//  Created by 王启颖 on 2019/2/22.
//  Copyright © 2019 王启颖. All rights reserved.
//

#import "MXCountView.h"

@interface MXCountView ()
@property (weak, nonatomic) IBOutlet UIImageView *mondayImg;
@property (weak, nonatomic) IBOutlet UIImageView *tuesdayImg;
@property (weak, nonatomic) IBOutlet UIImageView *wednesdayImg;
@property (weak, nonatomic) IBOutlet UIImageView *thursdayImg;
@property (weak, nonatomic) IBOutlet UIImageView *fridayImg;
@property (weak, nonatomic) IBOutlet UIImageView *saturdayImg;
@property (weak, nonatomic) IBOutlet UIImageView *sundayImg;
@property (weak, nonatomic) IBOutlet UILabel *keepCountLab;

@end

@implementation MXCountView

+ (instancetype)initMXCountView {
    return NSbunleloadNibName(@"MXCountView");
}

-(void)setParamsArr:(NSMutableArray *)paramsArr{
    _paramsArr = paramsArr;
    
    self.keepCountLab.text = [NSString stringWithFormat:@"这周已坚持%ld天",paramsArr.count];
    
    for (NSNumber *day in paramsArr) {
        switch (day.integerValue) {
            case 1:
                self.mondayImg.image = [UIImage imageNamed:@"小勾_sel"];
                break;
            case 2:
                self.tuesdayImg.image = [UIImage imageNamed:@"小勾_sel"];
                break;
            case 3:
                self.wednesdayImg.image = [UIImage imageNamed:@"小勾_sel"];
                break;
            case 4:
                self.thursdayImg.image = [UIImage imageNamed:@"小勾_sel"];
                break;
            case 5:
                self.fridayImg.image = [UIImage imageNamed:@"小勾_sel"];
                break;
            case 6:
                self.saturdayImg.image = [UIImage imageNamed:@"小勾_sel"];
                break;
            case 7:
                self.sundayImg.image = [UIImage imageNamed:@"小勾_sel"];
                break;
            default:
                break;
        }
    }
    
    
}

@end
